<?php
$album_setting = array(
    'table_name' => 'album_category',
    'key_field' => 'id',
    'value_field' => 'name'
    
);
?>
<div id ="content">
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
        <?php echo $this->session->flashdata('error'); ?>
    </div>
    <?php endif; ?>
    <?php echo form_open('admin_media/add_album'); ?>
    <div id="title_content">Thêm album mới</div>
        <table class="form_content" width="100%">
            <tr>
                <td>Tên album</td>
                <td>
                <?php if (form_error('title') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('title'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="title" size="35" maxlength="40" value="<?php echo set_value('title'); ?>" /></td>
        </tr>
        <tr>
            <td>Bộ sưu tập</td>
            <td>
            <?php if (form_error('category')!=""){?> <div class="form_error"><?php echo generate_pure_text(form_error('category'), '<p>', '</p>'); ?></div> <?php } ?>
<?php echo form_dropdown('category', dropdown_data($album_setting)); ?>
            </td>
        </tr>
        <tr>
      
        <tr>
            <td colspan="2"><?php echo form_submit('submit', 'Thêm mới',' class="form_submit"') ?></td>
        </tr>
    </table>
    <?php echo form_close(); ?>
</div>